package com.imooc;

import com.imooc.bilibili.service.websocket.WebSocketService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@MapperScan({"com.imooc.bilibili.dao"})
@SpringBootApplication
@EnableAsync
@EnableScheduling
@EnableTransactionManagement
public class BilibiliApp {
    public static void main(String[] args) {
        ApplicationContext ac = SpringApplication.run(BilibiliApp.class,args);
        WebSocketService.setApplicationContext(ac);
    }
}
